package com.supermarket.api.bean.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;

@ApiModel("用户注册参数")
@Data
public class RegisterReq {

    @Length(min = 11,max = 11)
    @ApiModelProperty(value = "手机号",required = true,dataType = "String",example = "18300000000")
    private String phone;

    @Email
    @ApiModelProperty(value = "电子邮箱",dataType = "String",example = "liqiwei123@outlook.com")
    private String email;

    @NotNull
    @ApiModelProperty(value = "登陆名",dataType = "String",example = "shasha")
    private String loginName;

    @ApiModelProperty(value = "用户名",dataType = "String",example = "shasha")
    private String userName;

    @NotNull
    @Length(min = 6,max = 20)
    @ApiModelProperty(value = "密码",required = true,dataType = "String",example = "d23s3aaf")
    private String password;

}
